package com.vlyman.shiro.service.impl;

import com.vlyman.shiro.entity.SysRole;
import com.vlyman.shiro.dao.SysRoleDao;
import com.vlyman.shiro.service.SysRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * 类描述：
 *   服务实现类
 *
 * @author chenjs
 * @date 2018-12-19 16:45
 */
@Service
public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRole> implements SysRoleService {

    /**
     * 方法描述：
     * 通过用户Id获取用户角色
     *
     * @param userId
     * @return SysUserRole
     * @author chenjs
     * @date 2018/12/20 17:17
     */
    @Override
    public SysRole getUserRoleByUserId(Integer userId) {
        return baseMapper.getUserRoleByUserId(userId);
    }
}
